﻿#ifndef SVTEMPLATECONTROLLER_H
#define SVTEMPLATECONTROLLER_H

#include <QFileDialog>
#include <QStandardItemModel>

#include "SVCalculateModel.h"
#include "SVTemplateModel.h"
#include "SVTemplateView.h"

class SVTemplateController : public QObject
{
    Q_OBJECT
public:
    SVTemplateController(QWidget *widget = nullptr, QObject *parent = nullptr);

    void loadCalculateModel(SVCalculateModel *model);

    QWidget *getView() const;

private slots:
    void onAddTemplateRequested();
    void onRemoveTemplateRequested(const QList<int> &indexs);

private:
    SVTemplateView *mTemplateView;
    SVCalculateModel *mCalculateModel;
    QStandardItemModel *mTemplateListModel;
};

#endif